package com.cheng.feign;

import com.cheng.common.utils.BaseResult;
import com.cheng.dto.device.DeviceDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = "cheng-server2",fallback = com.cheng.feign.fallback.DeviceServiceFallback.class)
public interface DeviceService {

    @GetMapping("/device/item")
    BaseResult<DeviceDTO> findItem(@RequestParam("id") Long id);

    @PostMapping("/device/post/item")
    public BaseResult<DeviceDTO> queryItem(@RequestBody DeviceDTO deviceDTO);
}
